function SlideManager(workspace) 
{	
	// Methods
	//
	this.AddSlide = function(slide) 
	{
		this.slides.push(slide);
		this.Count++;

		this.currentSlideIndex = this.Count - 1;
		this.ShowSlide(slide);
	}
	
	/*
	this.RemoveSlide = function(index) 
	{
		this.slides.splice(index, 1);
		this.Count--;
	}*/

	this.ShowSlide = function(slide)
	{
		this.workspace.HideAll();
		this.workspace.ShowControl(slide);
	}

	this.ShowSlideByIndex = function(index)
	{
		if(index < 0 || index >= this.Count)
			return;

		this.ShowSlide(this.slides[index]);
	}
	
	this.AddContentToSlide = function(content) 
	{
		var slide = this.slides[this.currentSlideIndex];
		slide.AddContent(content);
	}
	
	this.RemoveContentFromSlide = function(content) 
	{
		var slide = this.slides[this.currentSlideIndex];
		slide.RemoveContent(content);
	}
	
	// Fields
	this.Count = 0;

	this.currentSlideIndex = -1;
	this.slides = [];
	this.workspace = workspace;
}

/*
function SlideManager(workspace) 
{	
	// Methods
	this.AddSlide = function(slide) 
	{
		this.slides.push(slide);
		this.Count++;

		this.ShowSlide(this.Count - 1);
	}
	
	this.RemoveSlide = function(index) 
	{
		this.slides.splice(index, 1);
		this.Count--;

		//if(this.Count == 0)
		//	;

		if(index <= this.currentSlideIndex)
			this.currentSlideIndex--;
		
		this.ShowSlide(this.currentSlideIndex);
	}
	
	this.ShowSlide = function(index) 
	{
		var currentSlide = this.slides[index];
		var lastSlide = this.slides[this.currentSlideIndex];
		
		if(index != this.currentSlideIndex)
			workspace.RemoveControl(currentSlide);
		workspace.AddControl(lastSlide);
		
		this.currentSlideIndex = index;
	}
	
	this.AddContentToSlide = function(content) 
	{
		var slide = this.slides[this.currentSlideIndex];
		slide.addContent(content);
	}
	
	this.RemoveContentFromSlide = function(content) 
	{
		var slide = this.slides[this.currentSlideIndex];
		slide.removeContent(content);
	}
	
	// Fields
	this.currentSlideIndex = -1;
	this
	this.slides = [];
	this.Count = 0;
}
*/